<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta content="IE=7" http-equiv="X-UA-Compatible" />
	<title>后台登录</title>
	<script type="text/javascript" src="template/jslib/jquery.js"></script>
	<link href="template/admin/css/back.css" media="all" rel="stylesheet" type="text/css" />
</head>

<body class="loginbg">
	<form method="post" name="theform" id="theform" action="<!--{url('admin','login','')}-->" onsubmit="return checkform();">
	<div class="loginbk">
			<h1>请登录</h1>
			<ul>
				<li><label>用户名：</label><input type="text" value="" class="input_tx" id="uname" name="uname"/></li>
				<li><label>密码：</label><input type="password" value="" class="input_tx" id="pass" name="pass"/></li>
				<li><label>验证码：</label>
					<div class="login_c1">
							<input type="text" class="input_tx inp_w4" id="seccode" name="seccode"/>
							<span class="none">
								<img src="util.php?action=seccode&t=<!--{time()}-->" id="seccodeimg" class="mid"/>
								<span class="fl" onclick="chgimg()">换一张</span>
							</span>
					</div>
				</li>
				<li>
					<p>&nbsp;</p>
					<span class="nolabel"><input type="submit" value="登录" class="bt_style3"/> <a href="<!--{url('admin','login','getpwd')}-->">找回密码</a></span>
					<!--{if $error}--><span class="red"><!--{$error}--></span><!--{/if}-->
				</li>
			</ul>
	</div>
	</form>
</body>
</html>
<script type="text/javascript">
$(function(){
	$("#seccode").focus(function(){
		$(this).next().show();
		chgimg();
	}).keyup(function(){
		var $this = $(this);
		$this.val($this.val().toUpperCase());
	});
});
function checkform() {
	if($.trim($("#uname").val()) == "" ) {
		return false;
	}
	if($.trim($("#pass").val()) == "") {
		return false;
	}
	
	var $seccode = $("#seccode");
	if($seccode.val() == "") {
		$seccode.focus();
		return false;
	}
	
	return true;
}
function chgimg() {
	document.getElementById("seccodeimg").src = 'util.php?action=seccode&t='+new Date().getTime();
	return false;
}
</script>
